﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;

namespace TMTemplate
{
	public partial class MainPage : UserControl
	{
        public bool isEartStop = false;
		public MainPage()
		{
			InitializeComponent();
			VisualStateManager.GoToState(this, "Loading", false);
            VisualStateGroup.CurrentStateChanged += new EventHandler<VisualStateChangedEventArgs>(VisualStateGroup_CurrentStateChanged);
		}

        void VisualStateGroup_CurrentStateChanged(object sender, VisualStateChangedEventArgs e)
        {
            if (e.NewState.Name == "Normal") 
            {
                TMLibrary.UIHelper.SetTimeout(1850, () => 
                {
                    pageTransition.Normal.Storyboard.Begin();
                });
            };
        }
	}
}